package com.linkstec;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;

public class BlockingQueueTest {
	private static BlockingQueue<List<String>> BlockingresultSets;

	
	public static void main(String[] args) {
		BlockingresultSets = new LinkedBlockingDeque<List<String>>(
				5 + 2);
		
		List<String> list = new ArrayList<String>();
		list.add("fuck");
		list.add("you");
		try {
			BlockingresultSets.put(list);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		list = null;
		System.out.println(BlockingresultSets.size());
		List<String> list2 = null;
		try {
			list2 = BlockingresultSets.take();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println(list2);
	}
}
